export const appActionType = {
	getters: {
		getFirstCollection: "app/getFirstCollection",
		vocabularyCurrentProcess: "app/vocabularyCurrentProcess",
		studyRoomStudying: "app/studyRoomStudying",
		studyRoomId: "app/studyRoomId",
		studyRoomFloatOffsetX: "app/studyRoomFloatOffsetX",
		studyRoomFloatOffsetY: "app/studyRoomFloatOffsetY",
	},
	mutations: {
		setFirstCollection: "app/setFirstCollection",
		vocabularyCurrentProcess: "app/vocabularyCurrentProcess",
		studyRoomStudying: "app/studyRoomStudying",
		studyRoomId: "app/studyRoomId",
		studyRoomFloatOffsetX: "app/studyRoomFloatOffsetX",
		studyRoomFloatOffsetY: "app/studyRoomFloatOffsetY",
	},
}

export default {
	namespaced: false,
	state: {
		firstCollection: true, //是否是自打开小程序以来首次收藏
		vocabularyCurrentProcess: 0, //当天词汇学习进度
		
		studyRoomStudying: false, //当前是否处于自习室且处于学习状态
		studyRoomId: "", //当前自习室的用户计划id
		studyRoomFloatOffsetX: 0, //自习室悬浮窗的x坐标偏移量
		studyRoomFloatOffsetY: 0, //自习室悬浮窗的y坐标偏移量
	},
	getters: {
		[appActionType.getters.getFirstCollection](state) {
			return state.firstCollection
		},
		[appActionType.getters.vocabularyCurrentProcess](state) {
			return state.vocabularyCurrentProcess
		},
		[appActionType.getters.studyRoomStudying](state) {
			return state.studyRoomStudying
		},
		[appActionType.getters.studyRoomId](state) {
			return state.studyRoomId
		},
		[appActionType.getters.studyRoomFloatOffsetX](state) {
			return state.studyRoomFloatOffsetX
		},
		[appActionType.getters.studyRoomFloatOffsetY](state) {
			return state.studyRoomFloatOffsetY
		},
	},
	mutations: {
		[appActionType.mutations.setFirstCollection](state, val) {
			state.firstCollection = val
		},
		[appActionType.mutations.vocabularyCurrentProcess](state, val) {
			state.vocabularyCurrentProcess = val
		},
		[appActionType.mutations.studyRoomStudying](state, val) {
			state.studyRoomStudying = val
		},
		[appActionType.mutations.studyRoomId](state, val) {
			state.studyRoomId = val
		},
		[appActionType.mutations.studyRoomFloatOffsetX](state, val) {
			state.studyRoomFloatOffsetX = val
		},
		[appActionType.mutations.studyRoomFloatOffsetY](state, val) {
			state.studyRoomFloatOffsetY = val
		},
	},
	actions: {},
}